package com.lovely602.langchain4j.functioncalling;


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;

/**
 *
 * @author lizhixing
 */
@SpringBootApplication
public class LangChain4jFunctionCallingApplication {

    public static void main(String[] args) {
        SpringApplication.run(LangChain4jFunctionCallingApplication.class, args);
    }


    @Bean
    public RestTemplate restTemplate() {
        SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();
        requestFactory.setConnectTimeout(30000);// 设置超时
        requestFactory.setReadTimeout(30000);
        return new RestTemplate(requestFactory);
    }

}
